﻿@{
    ViewBag.Title = "新增员工";
}
@model FMS.UI.Areas.Admin.ViewModel.Employee
@section headsecion{
    <style type="text/css">        
        .tbList tr {
            height: 34px;
        }

        .tbList {
            border: 1px solid #ddd;
            height: 99.5%;
            border-collapse: collapse;
            margin: 0;
            padding: 0;
            width: 100%;
            border-top-width: 0;
            border-bottom-width: 0;
            border-left-width: 0;
            border-right-width: 0;
        }
            .tbList td, th {
                border: 1px solid #ddd;
                padding:  0 5px;
            }
        #tdname {
            width: 130px;
             text-align: center;
        }
        body {
            margin: 0;
            align-self: center;
        }    
        #form0 {
            margin: 0;
            padding: 0;
        }
    </style>

    <script type="text/javascript">
        $(function() {
            $("#empDepIdName").click(depChoose);
            // 去掉所有input的autocomplete, 显示指定的除外
            //$('input:not([autocomplete]),textarea:not([autocomplete]),select:not([autocomplete])').attr('autocomplete', 'off');

        });

        function depChoose() {
            $.globalHelper.showDepCommon("选择部门", "/admin/Usr/DepCOM/", 380, 290);

        }

        function begin(bool, text) {
            $.msgBoxObj.show("请稍后......");
        }

        function complete(xhrobj) {
            $.msgBoxObj.hide();
            $.msgProcess(xhrobj.responseText, function() {
                $.globalHelper.closeCommonWindow();
                $.globalHelper.reloadSeletecTabDataGrid();
            });
        }




    </script>
}
@using (Ajax.BeginForm(new AjaxOptions() { OnBegin = "begin", OnComplete = "complete" }))
{

    <table id="tbList" class="tbList">
        <tr>
            <td id="tdname">@Html.DisplayNameFor(o => o.empLoginName)</td>
            <td>@Html.TextBoxFor(o => o.empLoginName) @Html.ValidationMessageFor(o => o.empLoginName)</td>

        </tr>
        <tr>
            <td id="tdname">@Html.DisplayNameFor(o => o.empCnName)</td>
            <td>@Html.TextBoxFor(o => o.empCnName)  @Html.ValidationMessageFor(o => o.empCnName)</td>

        </tr>
        <tr>
            <td id="tdname">@Html.DisplayNameFor(o => o.empLoginPwd)</td>
            <td>@Html.PasswordFor(o => o.empLoginPwd)  @Html.ValidationMessageFor(o => o.empLoginPwd)</td>
        </tr>
        <tr>
            <td id="tdname">@Html.DisplayNameFor(o => o.empDepIdName)</td>
            <td id="depIdName">
                @Html.TextBoxFor(o => o.empDepIdName, new Dictionary<string, object>() { { "readonly", "readonly " }, { "onfocus", "this.blur()" } })
                @Html.TextBoxFor(o => o.empDepId, new { @type = "hidden" })
                @Html.ValidationMessageFor(o => o.empDepIdName, " ")
            </td>
        </tr>
        <tr>
            <td id="tdname">@Html.DisplayNameFor(o => o.empCellPhone)</td>
            <td>@Html.TextBoxFor(o => o.empCellPhone) @Html.ValidationMessageFor(o => o.empCellPhone)</td>
        </tr>
        <tr>
            <td id="tdname">@Html.DisplayNameFor(o =>o.isConPer )</td>
            <td>@Html.CheckBoxFor(o=>o.isConPer) </td>
        </tr>
        <tr>
            <td class="last" colspan="2" style="text-align:center;border:0 solid white;margin-bottom:0">
                <input type="submit" value="确定" style="height: 27px; width: 56px; margin-top: 6px; cursor: pointer" />
            </td>
        </tr>
    </table>


}
